-- GENERATED SPELL FOR [Sorcerer Ashcrombe] --


function spell0_3850(pUnit, Event) --@Ashcrombe\'s Unlock,Self--
pUnit:FullCastSpellOnTarget(6421,pUnit)
pUnit:RegisterEvent('Sorts_3850', 4000, 1)
end

function spell1_3850(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(2120,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3850', 10000, 1)
end

function spell2_3850(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(122,pUnit)
pUnit:RegisterEvent('Sorts_3850', 8000, 1)
end

function Sorts_3850(pUnit, Event)
local choix_sorts_3850 = math.random(0, 2)
if choix_sorts_3850 == 0 then
pUnit:RegisterEvent('spell0_3850', 1, 1)
end
if choix_sorts_3850 == 1 then
pUnit:RegisterEvent('spell1_3850', 1, 1)
end
if choix_sorts_3850 == 2 then
pUnit:RegisterEvent('spell2_3850', 1, 1)
end
end

function mob3850_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3850', math.random(1500, 3000), 1)
end

function mob3850_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3850_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3850_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3850, 1, 'mob3850_Action')
RegisterUnitEvent(3850, 2, 'mob3850_Leave')
RegisterUnitEvent(3850, 3, 'mob3850_Kill')
RegisterUnitEvent(3850, 4, 'mob3850_Die')
